//
//  SYP_playerMusicTableViewCell.m
//  wind
//
//  Created by SYP on 16/1/17.
//  Copyright © 2016年 李金明. All rights reserved.
//

#import "SYP_playerMusicTableViewCell.h"
#import "LJMAdaption_Height_Width.h"
#import "Masonry.h"

@implementation SYP_playerMusicTableViewCell

- (void)dealloc
{
    [_musicName release];
    [_musicNum release];
    [_singerName release];
    [super dealloc];
}
- (void)creatSubviews
{
    [self creatViews];
}
#pragma 创建cell里的内容
- (void)creatViews
{
    
    // 歌曲名
    self.musicName = [UILabel new];
    self.musicName.textColor = [UIColor colorWithWhite:0.176 alpha:1.000];
    self.musicName.text = @"暂无信息";
    self.musicName.font = [UIFont systemFontOfSize:16 * SCREEN_ONE];
    [self.contentView addSubview:self.musicName];
    [_musicName release];
    
    // 歌曲的序号
    self.musicNum = [UILabel new];
    self.musicNum.textColor = [UIColor colorWithRed:0.643 green:0.443 blue:0.953 alpha:1.000];
    [self.contentView addSubview:self.musicNum];
    [_musicNum release];
    
    // 歌手名
    self.singerName = [UILabel new];
    self.singerName.textColor = [UIColor colorWithWhite:0.656 alpha:1.000];
    self.singerName.text = @"暂无";
    self.singerName.font = [UIFont systemFontOfSize:14 * SCREEN_ONE];
    [self.contentView addSubview:self.singerName];
    [_singerName release];
    
}
#pragma 界面加载时调整位置和大小
- (void)layoutSubviews
{
    // 对序号的位置大小的约束
    [self.musicNum mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.centerY.equalTo(self.contentView);
        make.left.equalTo(self.contentView).with.offset(SCREEN_WIDTH / 15);
        make.width.height.mas_equalTo(SCREEN_WIDTH / 15);
        
    }];
    
    // 对歌名位置大小的约束
    [self.musicName mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.musicNum.mas_right).with.offset(SCREEN_WIDTH / 20);
        make.centerY.equalTo(self.contentView);
        make.width.mas_equalTo(SCREEN_WIDTH / 10 * 4);
        make.height.mas_equalTo(self.contentView.frame.size.height / 3 * 2);
        
    }];
    
    // 对歌手位置大小的约束
    [self.singerName mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.equalTo(self.musicName.mas_right).with.offset(SCREEN_WIDTH / 25);
        make.centerY.equalTo(self.contentView);
        make.width.mas_equalTo(SCREEN_WIDTH / 10 * 3);
        make.height.mas_equalTo(self.contentView.frame.size.height / 4 * 2);
        
    }];
    
    
    
}

@end
